
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
 <head> 
     <title>Entity Record Counts</title> 
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> 
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">       
     <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular-csp.css">
 </head> 
 <body  ng-app="recordCountApp">
        
    <div class="container" role="main" ng-controller="recordCountController">
        <div class="row" style="margin-top:25px">
                <div class="col-sm-2">
                    <div class="form-group">
                        <label for="entityName">Entity Name</label>                        
                    </div>
                </div>
              <div class="col-sm-4">
                    <div class="form-group">                        
                        <input type="text" class="form-control" style="width:200px" id="entityName">
                    </div>
                </div>

                <div class="col-sm-2">      
                    <div class="form-group">              
                        <button type="submit" class="btn btn-primary " ng-click="getcount()">Get Count</button>
                        </div>                    
                </div>       
        </div>   
       
            <div  ng-show="showResultsTable" class="ng-hide">
                <div class="row"  >
                    <table id="datatable" class="table table-striped table-bordered table-condensed table-hover" >
                        <thead>
                            <tr>
                                <th class="col-sm-1">Entity Name</th>
                                <th class="col-sm-1">Record Count</th>
                                <th class="col-sm-1">Status</th>
                            </tr>
                        </thead>
                        <tbody ng-repeat="item in recordCounts">
                            <tr>
                                <td class="col-sm-1">{{item.EntityName}}</td>
                                <td class="col-sm-1">{{item.RecordCount}}</td>
                                <td class="col-sm-1">{{item.Status}}</td>
                            </tr>
                        </tbody>
        
                    </table>
                    </div>
            </div>            
    </div>
  
    <script src="../../ClientGlobalContext.js.aspx" type="text/javascript" ></script>    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>    
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"></script>
    <script src="https://www.promisejs.org/polyfills/promise-7.0.4.min.js"></script>
    <script src="https://xrmtoolscode.azureedge.net/CRMWebAPI-1.1.0.js"></script>        
    <script src="scripts/RecordCount.js" type="text/javascript"></script>
   </body>
  </html>
